package com.example.wenzimanxian;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Strat9Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_strat9);
        Button astrat4=findViewById(R.id.A4_strat);
        astrat4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SharedPreferences sp=getSharedPreferences("youxi",MODE_PRIVATE);
                SharedPreferences.Editor editor=sp.edit();
                editor.putString("name2","aa");
                editor.commit();
                Intent intent=new Intent(Strat9Activity.this,Strat10Activity.class);
                startActivity(intent);
            }
        });
        Button bstrat4=findViewById(R.id.B4_strat);
        bstrat4.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SharedPreferences sp=getSharedPreferences("youxi",MODE_PRIVATE);
                SharedPreferences.Editor editor=sp.edit();
                editor.putString("name2","bb");
                editor.commit();
                Intent intent=new Intent(Strat9Activity.this,Strat11Activity.class);
                startActivity(intent);
            }
        });
    }
}
